package com.siao.example.libaray.main.ui
{
	import com.siao.component.Stack;
	import com.siao.display.Align;
	import com.siao.example.common.ui.CommonButton;
	
	/**
	 * 菜单栏
	 * @author SiaoLeon
	 */
	public class CategoryMenuBar extends Stack
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		/**
		 * MVC示例按钮
		 */
		public var btnMVC:CommonButton;
		
		/**
		 * 显示示例按钮
		 */
		public var btnDisplay:CommonButton;
		
		/**
		 * 组件示例按钮
		 */
		public var btnComponent:CommonButton;
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 */
		public function CategoryMenuBar()
		{
			super();
			
			this.height = 40;
			this.padding = 10;
			this.spacing = 10;
			
			this.contentAlignH = Align.LEFT;
			this.contentAlignV = Align.CENTER;
			
			this.draw(0XFFF000, 0.2);
		}
		
		// -------------------------------------------------------------------------------------------------------- 方法
		
		// -------------------------------------------------------------------------------------------------------- 函数
		
		override protected function onAddedToStage():void
		{
			this.btnMVC = new CommonButton("MVC示例");
			this.addChild(this.btnMVC);
			
			this.btnDisplay = new CommonButton("显示示例");
			this.addChild(this.btnDisplay);
			
			this.btnComponent = new CommonButton("组件示例");
			this.addChild(this.btnComponent);
		}
		
		override protected function onRemovedFromStage():void
		{
			this.clear();
		}
	
	}
}
